package com.citycloud.ccuap.tc.sync.repository;

import com.citycloud.ccuap.commons.sys.entity.SysProjectDeptmentRel;
import org.springframework.data.mybatis.repository.support.MybatisRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 项目管理与部门关系数据库操作
 *
 * @author sufeng
 *
 */

@Repository("sysPDRepository")
public interface SysProjectDeptmentRelRepository extends MybatisRepository<SysProjectDeptmentRel, Long> {

    void deleteByDeptIdAndProjectId(Long deptId, Long projectId);

    void deleteByDeptId(Long deptId);

    List<SysProjectDeptmentRel> findByProjectId(Long projectId);

    List<SysProjectDeptmentRel> findByDeptId(Long deptId);

    List<SysProjectDeptmentRel> getByProjectId(Long projectId);
}